package com.base.vo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * EmpiId与PatientId的关系表
 * @TableName empi_patient_rel
 */
@TableName(value ="empi_patient_rel")
@Data
public class EmpiPatientRel implements Serializable {
    /**
     * 
     */
    @TableId
    private String iguid;

    /**
     * 患者Id
     */
    private String empiid;

    /**
     * PatientId，可理解卡的惟一Id
     */
    private String patientid;

    /**
     * 标志着该卡是否是共享卡
     */
    private Byte isshare;

    /**
     * 
     */
    private String systemname;

    /**
     * 
     */
    private String hospitalno;

    /**
     * 
     */
    private Date createat;

    /**
     * 
     */
    private String remark;

    /**
     * 
     */
    private String seqno;

    /**
     * 
     */
    private String compareseqno;

    /**
     * 
     */
    private Byte reltype;

    /**
     * 
     */
    private Integer weight;

    /**
     * 
     */
    private String algorithmconfigid;

    /**
     * 
     */
    private String fieldsname;

    /**
     * 
     */
    private Byte isdeleted;

    /**
     * 
     */
    private String fields;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        EmpiPatientRel other = (EmpiPatientRel) that;
        return (this.getIguid() == null ? other.getIguid() == null : this.getIguid().equals(other.getIguid()))
            && (this.getEmpiid() == null ? other.getEmpiid() == null : this.getEmpiid().equals(other.getEmpiid()))
            && (this.getPatientid() == null ? other.getPatientid() == null : this.getPatientid().equals(other.getPatientid()))
            && (this.getIsshare() == null ? other.getIsshare() == null : this.getIsshare().equals(other.getIsshare()))
            && (this.getSystemname() == null ? other.getSystemname() == null : this.getSystemname().equals(other.getSystemname()))
            && (this.getHospitalno() == null ? other.getHospitalno() == null : this.getHospitalno().equals(other.getHospitalno()))
            && (this.getCreateat() == null ? other.getCreateat() == null : this.getCreateat().equals(other.getCreateat()))
            && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()))
            && (this.getSeqno() == null ? other.getSeqno() == null : this.getSeqno().equals(other.getSeqno()))
            && (this.getCompareseqno() == null ? other.getCompareseqno() == null : this.getCompareseqno().equals(other.getCompareseqno()))
            && (this.getReltype() == null ? other.getReltype() == null : this.getReltype().equals(other.getReltype()))
            && (this.getWeight() == null ? other.getWeight() == null : this.getWeight().equals(other.getWeight()))
            && (this.getAlgorithmconfigid() == null ? other.getAlgorithmconfigid() == null : this.getAlgorithmconfigid().equals(other.getAlgorithmconfigid()))
            && (this.getFieldsname() == null ? other.getFieldsname() == null : this.getFieldsname().equals(other.getFieldsname()))
            && (this.getIsdeleted() == null ? other.getIsdeleted() == null : this.getIsdeleted().equals(other.getIsdeleted()))
            && (this.getFields() == null ? other.getFields() == null : this.getFields().equals(other.getFields()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getIguid() == null) ? 0 : getIguid().hashCode());
        result = prime * result + ((getEmpiid() == null) ? 0 : getEmpiid().hashCode());
        result = prime * result + ((getPatientid() == null) ? 0 : getPatientid().hashCode());
        result = prime * result + ((getIsshare() == null) ? 0 : getIsshare().hashCode());
        result = prime * result + ((getSystemname() == null) ? 0 : getSystemname().hashCode());
        result = prime * result + ((getHospitalno() == null) ? 0 : getHospitalno().hashCode());
        result = prime * result + ((getCreateat() == null) ? 0 : getCreateat().hashCode());
        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
        result = prime * result + ((getSeqno() == null) ? 0 : getSeqno().hashCode());
        result = prime * result + ((getCompareseqno() == null) ? 0 : getCompareseqno().hashCode());
        result = prime * result + ((getReltype() == null) ? 0 : getReltype().hashCode());
        result = prime * result + ((getWeight() == null) ? 0 : getWeight().hashCode());
        result = prime * result + ((getAlgorithmconfigid() == null) ? 0 : getAlgorithmconfigid().hashCode());
        result = prime * result + ((getFieldsname() == null) ? 0 : getFieldsname().hashCode());
        result = prime * result + ((getIsdeleted() == null) ? 0 : getIsdeleted().hashCode());
        result = prime * result + ((getFields() == null) ? 0 : getFields().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", iguid=").append(iguid);
        sb.append(", empiid=").append(empiid);
        sb.append(", patientid=").append(patientid);
        sb.append(", isshare=").append(isshare);
        sb.append(", systemname=").append(systemname);
        sb.append(", hospitalno=").append(hospitalno);
        sb.append(", createat=").append(createat);
        sb.append(", remark=").append(remark);
        sb.append(", seqno=").append(seqno);
        sb.append(", compareseqno=").append(compareseqno);
        sb.append(", reltype=").append(reltype);
        sb.append(", weight=").append(weight);
        sb.append(", algorithmconfigid=").append(algorithmconfigid);
        sb.append(", fieldsname=").append(fieldsname);
        sb.append(", isdeleted=").append(isdeleted);
        sb.append(", fields=").append(fields);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}